﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using DevExpress.LookAndFeel;
using System.Windows;


namespace eKanbanWPF
{
    class Program : System.Windows.Application
    {
        [System.STAThreadAttribute()]
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public static void Main()
        {
            eKanbanWPF.App app = new eKanbanWPF.App();
            System.Console.Write("Test GUI ?");
            string answer = System.Console.ReadLine();
            if (answer == "y" || answer == "Y")
            {
                DevExpress.Skins.SkinManager.EnableFormSkins();
                DevExpress.UserSkins.OfficeSkins.Register();
                DevExpress.UserSkins.BonusSkins.Register();
                //UserLookAndFeel.Default.SetSkinStyle("McSkin");
                app.StartupUri = new System.Uri("NhatTest.xaml", System.UriKind.Relative);
                app.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(app_DispatcherUnhandledException);
                app.Run();
            }
            else
            {
                try
                {
                    System.Console.Clear();
                    Console.WindowHeight = 50;
                }
                catch (Exception)
                {
                }
                new ConsoleDemo();
            }
        }

        static void app_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {
            MessageBox.Show("General Exception: " + e.Exception.Message, "Application Error", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK);
            e.Handled = true;
        }

    }
}
